package org.lex.ftplist.ui.action;

import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.JFrame;

import org.jdesktop.application.ApplicationContext;
import org.lex.ftplist.ui.ApplicationOperator;
import org.lex.ftplist.ui.FLApplication;

public abstract class FLAction extends AbstractAction {
	protected void setName(String name) {
		this.putValue(Action.NAME, name);
	}

	protected FLApplication getApplication() {
		return FLApplication.getInstance();
	}

	protected ApplicationOperator getOperator() {
		return FLApplication.getInstance().getOperator();
	}

	protected JFrame getMainFrame() {
		return FLApplication.getInstance().getMainFrame();
	}

	protected ApplicationContext getContext() {
		return FLApplication.getInstance().getContext();
	}
}
